<template>
    <div class="big">
      <el-breadcrumb :separator-icon="ArrowRight">
      <el-breadcrumb-item :to="{ path: '/index' }">首页</el-breadcrumb-item>
      <el-breadcrumb-item>考勤报表</el-breadcrumb-item>
      <el-breadcrumb-item>考勤日报</el-breadcrumb-item>
    </el-breadcrumb>
    <div class="record">
      <div class="block">
       &emsp; <span>查询：</span> 
        <el-date-picker
          v-model="value1"
          type="date"
          placeholder="请选择查询日期"
          format="YYYY/MM/DD"
          value-format="YYYY-MM-DD"
        />
      </div>
      <div class="an"> <el-button type="primary" @click="find()"> 查询</el-button></div>
   
  <div class="an"> <el-button type="primary">导出</el-button></div>
     
    </div>
  
    <div class="table">
      <div class="biao"> <span>考勤日报</span></div>
    <el-table :data="tableData" size="large " border style="width: 100%" fit type="index">
        <el-table-column  label="序号" type="index" width="60" />
      <el-table-column prop="qq" label="日期" width="180"/>
      <el-table-column label="出勤(人数)">
      <el-table-column prop="ww" label="应出勤人数" width="180" />
      <el-table-column prop="ee" label="已出勤人数" />
      <el-table-column prop="rr" label="迟到人数" />
  
      
      <el-table-column prop="tt" label="早退人数" />
      <el-table-column prop="yy" label="缺勤人数" />
      </el-table-column>
      <el-table-column label="考勤异常(人数)">
      <el-table-column prop="uu" label="未签到" />
      <el-table-column prop="ii" label="未签退" />
      </el-table-column>
      <el-table-column prop="oo" label="出差" />
    </el-table>
  
    </div>
    </div> 
  </template>
  
  <script  setup>
  import { ArrowRight } from '@element-plus/icons-vue'
  import * as service from '@/api/wenbo/wenbo'
  import { ref,onMounted } from 'vue'
  
  let tableData = ref([])
  const value1 = ref('')
  
  let find = async() => {
    console.log(value1.value);
    let res = await service.daily({qq_like:value1.value})
    console.log(res);
    
    tableData.value = res.data
  }
  

  onMounted( async ()=>{
    let res = await service.daily()
    console.log(res);
    tableData.value = res.data
  })
  </script >
  
  <style lang="scss" scoped>
    .big{
      width: 100%;
    }
  .record{
    width: 90%;
    height: 80px;
    background: #eee;
    margin:20px auto;
    display: flex;
    align-items: center;
    .an{
      margin-left: 20px;
    }
    
  }
  .table{
    width: 95%;
    height: 100%;
    margin: 0 auto;
    .biao{
      width: 100%;
      height: 60px;
      background: #eee;
      margin: 20px auto;
      font-size: 20px;
      line-height: 60px;
      text-indent: 30px
    }
  }
  
  
  
  
  
  
  
  
  
  .demo-date-picker {
    display: flex;
    width: 100%;
    padding: 0;
    flex-wrap: wrap;
  }
  .demo-date-picker .block {
    padding: 30px 0;
    text-align: center;
    border-right: solid 1px var(--el-border-color);
    flex: 1;
  }
  .demo-date-picker .block:last-child {
    border-right: none;
  }
  .demo-date-picker .demonstration {
    display: block;
    color: var(--el-text-color-secondary);
    font-size: 14px;
    margin-bottom: 20px;
  }
  </style>